package com.lokyiu.tutorial.java.exerisce4;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class StudentGenarator {
	private List<Student> students;
	
	public StudentGenarator(int numberOfStudent){
		List<Student> students = new ArrayList<Student>();
		Random rand = new Random();
		for(int i = 0 ; i < numberOfStudent ; i++ ){
			Student student = new Student(i + 1);
			student.setClassId(String.valueOf("C"+(rand.nextInt(5)+1)));
			student.setSchoolName("ABC");
			student.setFormId(String.valueOf("F"+(rand.nextInt(5)+1)));
			students.add(student);
		}
		this.students=students;
	}
	
	public List<Student> getStudents(){
		return this.students;
	}
}
